#include <stdio.h>
#include <stdlib.h>

/** @def MAX 10001
 * Description
 */
#ifndef MAX
#define MAX 10001
#endif /* END OF MAX */


int main (int argc, char const* argv[])
{

    int a[MAX+1];
    int i, sum, b;

    for (i = 1; i < MAX; i++) {
        a[i] = 0;
    }
    for (i = 1; i < MAX; i++) {
        sum = b = i;
        while (b) {
            sum += b % 10;
            b = b / 10;
        }
        if (sum < MAX) {
            a[sum] = 1;
        }
    }

    for (i = 1; i < MAX; i++) {
        if (a[i] == 0) {
            printf("%d\n", i);
        }
    }

    return 0;
}
